package com.concurrent.sample.business.manager;

import com.concurrent.sample.business.entity.EventEntity;
import com.concurrent.sample.business.listener.event.SysTradeExecReportEvent;
import com.concurrent.sample.business.dto.param.ConfirmTradeEventParam;
import com.concurrent.sample.business.dto.request.CreateTradeEventRequest;
import java.util.List;

public interface EventDispatchService {

  /**
   * 创建交易事件并执行下单逻辑
   * @param createOrderEventsParams
   */
  void placeTrade(List<CreateTradeEventRequest> createOrderEventsParams);

  /**
   * 创建交易事件
   * @param createOrderEventsParams
   * @return
   */
  List<EventEntity> newTradeEvent(List<CreateTradeEventRequest> createOrderEventsParams);

  /**
   * 自动审批
   * @param confirmTradeEventParams
   */
  void autoExamine(List<ConfirmTradeEventParam> confirmTradeEventParams);

  /**
   * 确认订单
   * @param order
   */
  void confirm(ConfirmTradeEventParam order);

  /**
   * 处理系统内部的成交回报
   * @param sysTradeExecReportEvent
   */
  void handleSysTradeExecReportEvent(SysTradeExecReportEvent sysTradeExecReportEvent);

}
